import { http } from "@/utils/http";
import { baseUrlApi } from "@/api/utils";

export const getAllList = params => {
  return http.request("get", "/business/average-user/agents", params);
};
// 任务列表
export function getPageList(params) {
  return http.request("get", baseUrlApi("business/project_task/listAverageTask"), { params });
}
// 搜索服务商
export function listMerchantName(params) {
  return http.request("get", baseUrlApi("business/user_data_permissions/listMerchantName"), { params });
}
export const submitData = (params: any) => {
  return http.request(params.id ? "put" : "post", `/business/average-user/${params.id ?? ""}`, {
    data: params
  });
};

export const getSingle = (id: number) => {
  return http.request("get", `/business/average-user/${id}`);
};

export const deleteData = (id: number) => {
  return http.request("delete", `/business/average-user/${id}`);
};
